My Meme

I was inspired by a meme that my friend had sent to me that really related to me, considering that I don’t really go into university often. When I was in my first year, I remember attending every single lecture however, now as a third year I don’t go to class unless I really have to and chose to stay at home. The first meme I recreated was this one below:

After I finished making the meme above, I actually found another meme similar to it and I wanted to reuse the template that I made and create a new meme, which will be my final meme that I will be sumbitting.

library(magick)


evilCat <- image_read("https://i.pinimg.com/236x/bf/f5/d0/bff5d074d399bdfec6071e9168398406--so-funny-funny-pics.jpg") %>%
  image_scale(500) %>%
  image_flop() %>% #flipping it so the cat faces the text 
  image_border("white")

stressCat <- image_read("https://pbs.twimg.com/media/Fcx99L9XEAIOW-6?format=jpg&name=large") %>%
  image_scale(500) %>%
  image_flop() %>%
  image_border("white")

sadCat <- image_read("https://64.media.tumblr.com/1b89ed14c7fbdb720033a0320faaf391/8c7b827c141b518b-1c/s400x600/51d18b6f516fb71fd9fd54f94500cc18d929f8cf.png") %>%
  image_scale(500) %>%
  image_border("white")


#primarySchool 7 days = Happy cat
psText <- image_blank(width = 500, 
                      height = 500, 
                      color = "#FFEFF9",) %>%
  image_annotate(text = "Me going to\n Primary School\n 7 days a week",
                 color = "#505050",
                 size = 70,
                 font = "Times New Roman",
                 gravity = "center")

#highSchool 6 days = stressed cat
hsText <- image_blank(width = 500, 
                      height = 500, 
                      color = "#FFEFF9") %>%
  image_annotate(text = "Me going\n to High School\n 6 days a week",
                 color = "#505050",
                 size = 70,
                 font = "Times New Roman",
                 gravity = "center")

#uni cat 2 days = sad cat
uniText <- image_blank(width = 500, 
                       height = 500, 
                       color = "#FFEFF9") %>%
  image_annotate(text = "Me when I go to\n University \n2 days\n in a row",
                 color = "#505050",
                 size = 70,
                 font = "Times New Roman",
                 gravity = "center")



first_row <- c(psText, evilCat) %>%
  image_append()

second_row <- c(hsText, stressCat) %>%
  image_append()

third_row <- c(uniText, sadCat) %>%
  image_append()


meme <- c(first_row, second_row, third_row) %>%
  image_append(stack = TRUE)

image_write(meme, "meme.png")

My animated GIF

I was looking for images for my GIF and I found 3 different versions of the same image and I thought it would be fun to combine them. However, the requirement was to have 4 frames, and since I only had 3 images, I decided to change the brightness, the saturation and the Hue of one of the images to make it 4 unique photos.

Additionally, I also added some subtitles to the GIF, to make it more interesting and appear as if the girl is surprised.

library(magick)

gif_size <- "500x500" 

#store images
pic2 <- image_read("https://i.pinimg.com/564x/64/ca/e2/64cae261bbffec63a5ab996b23c03b11.jpg") %>%
  image_scale(500)
pic4 <- image_read("https://i.pinimg.com/564x/62/f1/e7/62f1e7855ec72228b9943dc5c865a5f3.jpg") %>%
  image_scale(500)
pic3 <- image_read("https://i.pinimg.com/564x/c2/46/ef/c246efb60777af288d6d18e26e8d6f71.jpg") %>%
  image_scale(500)


# create counts
counts <- 1 : 4 %>% as.character()

# creating frame
frame1 <- pic4 %>%
  image_annotate(text = "OMG!",color = "#c45190", boxcolor = "pink", size = 40, gravity = "south", degrees = 10) %>%
  image_scale(500) %>%
  image_extent(gif_size)

frame2 <- pic2 %>%
  image_annotate(text = "OMG!!",color = "#c45190", boxcolor = "pink", size = 50, gravity = "south", degrees = -10) %>%
  image_scale(500) %>%
  image_extent(gif_size)

frame3 <- pic3  %>%
  image_annotate(text = "OMG!!!",color = "#c45190", boxcolor = "pink", size = 60, gravity = "south", degrees = 10) %>%
  image_scale(500) %>%
  image_extent(gif_size)

frame4 <- pic4 %>%
  image_scale(500) %>%
  image_extent(gif_size) %>%
  image_modulate(brightness = 80, saturation = 70, hue = 100) %>%
  image_annotate(text = "OMG!!!!",color = "#c45190", boxcolor = "pink", size = 70, gravity = "south", degrees = -10)  

frames <- c(frame1, frame2, frame3, frame4)

# create animation
animation <- image_animate(frames, fps = 5)
image_write(animation, "my_animation.gif")
@import url('https://fonts.googleapis.com/css2?family=Mukta&display=swap');
body {font-weight: italic; color: #616f99; background-color: #f1f9ff; font-family: 'Mukta', sans-serif}